package unitrole

import (
	"gogogo-server/engine/cororpc"
	"gogogo-server/logicserver/gamelogic/unitroom"
	"gogogo-server/protocol"
)

type Role struct {
	protocol.RoleBasicNode
	agent         cororpc.IGateAgent
	currentRoomId uint64
}

func (r *Role) Uid() uint64 {
	return r.RoleBasicNode.RoleUid
}

func (r *Role) GetCurrentRoom() *unitroom.Room {
	if 0 == r.currentRoomId {
		return nil
	}
	return unitroom.RoomInstance().FindRoom(r.currentRoomId)
}
